package Poker;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Deck {
	private List<Card> deck = new ArrayList<Card>();
	
	public Deck()
	{
		Shuffle();
	}
	
	public void Shuffle()
	{	
		for(int i = 0; i < 4; ++i)
		{
			for(int j = 0; j < 13; ++j)
			{
				deck.add(new Card(i,j));
			}
		}
		
		Collections.shuffle(deck);
	}
	
	public Card GetCard()
	{
		Card card = deck.get(deck.size() - 1);
		deck.remove(deck.size() - 1);
		return card;
	}
	
	public void Print()
	{
		for(int i = 0; i < deck.size(); ++i)
			System.out.println(deck.get(i).toString());
	}
}
